<!--#include file="../config.asp" -->
<%
'*****************************************************
'Description: 公共头部引用页面
'Copyright:Copyright(c)2012
'Company:204studio
'@author:klarkyang
'@version:1.0
'******************************************************
%>
<!--#include file="../inc/Cookies.asp" -->
<%
'验证用户是否登录
call checkCookies(1)
%>
<!--#include file="../conn.asp" -->
<!--#include file="../inc/Sha1.asp" -->
<!--#include file="../inc/EasyIDE.asp" -->
<!--#include file="../inc/CommonUtils.asp" -->
<!--#include file="../inc/SysFunction.asp" -->
<%
username = session("username")
realname = session("realname")

'解析角色列表，用于显示用户角色
sql = "select * from cw_users where username='"&username&"'"
set rs = ado_query(sql)
roleCurrentList = showRoleListByRoleCollection(rs("roleCollection"))
rs.close : set rs=nothing

'列出拥有的操作
sql = "select * from cw_operations order by operOrder asc"
set rs = ado_query(sql)
operCurrentList=""
do while not rs.eof
	operCurrentList = operCurrentList&showRoleByUsername(username,rs("operId"))
rs.movenext
loop
rs.close : set rs=nothing
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=SITENAME%></title>
<link href="../css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/JsCommonUtils.js"></script>
<script type="text/javascript" src="../js/validator.js"></script>
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/jquery/jquery-1.6.2.min.js"></script>

<link href="../js/jquery/ui/jquery-ui-1.7.3.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery/ui/jquery-ui-1.7.3.custom.min.js"></script>
</head>

<body>
<!-- ui-dialog -->
<div id="dialog"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="100" align="left" background="../images/banner_bg.jpg"><img src="../images/banner.jpg" width="800" height="100" /></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="function_bar">
  <tr>
    <td class="lanmu">
    <div class="function_show"><%=operCurrentList%></div>
	</td>
  </tr>
  <tr>
    <td background="../images/function_bg.jpg">
      <div class="role_div"><div><img src="../images/p.gif" width="19" height="18" class="img_role"/><%=realname%>，您好！<a href="../logout.asp"> 注销</a> | <a href="../main/admin.asp">返回首页</a> | 您的角色：</div><%=roleCurrentList%></div>
</td>
  </tr>
</table>